import com.yiqiniu.easytrans.EnableEasyTransaction;
import com.yiqiniu.easytrans.rpc.impl.dubbo.EnableRpcDubboImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;


@EnableEasyTransaction
@EnableTransactionManagement
@EnableRpcDubboImpl
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan(basePackages = {"com.tct.common", "com.tct.config", "com.tct.mapper", "com.tct.service", "com.tct.dubbo"})
public class AApplication {


    public static void main(String[] args) {
        SpringApplication.run(AApplication.class, args);
    }

    /**
     * This is an optional bean, you can modify Dubbo reference here to change the behavior of consumer
     * 可选操作,可对dubbo消费做控制
     * @return
     */
//    @Bean
//    public DubboReferanceCustomizationer dubboConsumerCustomizationer() {
//        return new DubboReferanceCustomizationer() {
//
//            @Override
//            public void customDubboReferance(String appId, String busCode, ReferenceConfig<GenericService> referenceConfig) {
//                Logger logger = LoggerFactory.getLogger(getClass());
//                logger.info("custom dubbo consumer!");
//            }
//        };
//    }

}

